package com.example.demo.mapper;

import com.example.demo.entity.ProcurementDetailsRecode;
import com.example.demo.entity.PurchaseReceiptDetailsRecode;
import com.example.demo.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * @author : Zhang.yt
 * @date : 2023/12/6
 */
@Mapper
public interface WmsPurchaseMapper {

    List<PurchaseNotReceiptVo> getPurchaseNotReceiptCallback();

    List<PurchaseNotReceiptListVo> getPurchaseNotReceiptListCallback(List<String> sbillnoList);

    void updatePurchaseReceiptCallback(String slno, String erpBackNo, Integer opflg);

    List<PurchaseReceiptFormVo> getPurchaseReceiptFormCallback();

    List<PurchaseReceiptFormListVo> getPurchaseReceiptFormListCallback(List<String> sbillnoList);

    WarehouseTransferVo getWarehouseTransferCallback();

    List<WarehouseTransferListVo> getWarehouseTransferListCallback(String sbillno);

    List<TransferOutVo> getTransferOutCallback();

    List<TransferOutListVo> getTransferOutListCallback(String sbillno);

    TransferInVo getTransferInCallback();


    PickingOutVo getPickingOutCallback();

    List<PickingOutVoReceiptListVo> getPickingOutReceiptListCallback(String outno, String sbillno, String mkerid);

    void updatePurchaseReceiptFormCallback(String pmds055, String indcdocno, Integer opflg, int i);

    void updateWarehouseTransferCallback(String indc003, String indcdocno, Integer opflg);

    void updateReGetMaterialCallback(String sfda014, String sfdadocno, Integer opflg);

    ReturnInVo getReturnInCallback();

    List<ReturnInReceiptListVo> getReturnInReceiptListCallback(String inno);

    void updateReBackMaterialCallback(String sfda014, String sfdadocno, Integer opflg);

    List<OtherInWarehousingVo> getOtherInWarehousingCallback();

    List<OtherInWarehousingListVo> getOtherInWarehousingListCallback(List<String> innoList);

    void updateOtherInWarehousingCallback(String inba006, String inbadocno, Integer opflg);

    List<OtherOutWarehouseVo> getOtherOutWarehousingCallback();

    List<OtherOutWarehouseListVo> getOtherOutWarehousingListCallback(List<String> outnoList);

    void updateOtherOutWarehouseCallback(String inba006, String inbadocno, Integer opflg);

    CompleteInVo getCompleteInCallback();

    List<CompleteInVoReceiptListVo> getCompleteInReceiptListCallback(List<String> innoList);

    List<CompleteInVoReceiptListVo> getCompleteInReceiptListCallback(String inno);

    void updateWorkOrderinCallback(String sfeaud005, String sfeadocno, Integer opflg);

    List<PurchaseBackVo> getPurchaseBackCallback();

    List<PurchaseBackListVo> getPurchaseBackListCallback(List<String> sbillnoList);

    void updatePurchaseBackCallback(String pmds055, String pmdtdocno, Integer opflg);

    DeletePurchaseNotReceiptVo getDeletePurchaseReceiptCallback(String orderNo);

    DeletePickingOutVo getDeletePickingOutCallback(String orderNo);

    DeleteReturnIntVo getDeleteReturnInCallback(String orderNo);

    List<ProcurementDetailsVo> getProcurementDetailsVo(Set<String> purchaseOrderNos, Integer Pmdl005);

    void updateAddProcurementDetails(@Param("procurementDetailsRecode") ProcurementDetailsRecode procurementDetailsRecode);


    DeleteCompleteInVo getDeleteCompleteInCallback(String orderNo);

    DeleteOtherOutWarehouseVo getDeleteOtherOutWarehouseCallback(String orderNo);

    DeleteOtherInWarehouseVo getDeleteOtherInWarehousingCallback(String orderNo);

    DeleteWarehouseTransferVo getDeleteWarehouseTransferCallback(String orderNo);

    DeletePurchaseReceiptFormVo getDeletePurchaseReceiptFormCallback(String orderNo);

    List<PurchaseReceiptDetailsVo> getPurchaseReceiptDetailsVo(@Param("purchaseReceiptOrderNos") Set<String> purchaseReceiptOrderNos);

    void updateAddPurchaseReceipt(@Param("purchaseReceiptDetailsRecode") PurchaseReceiptDetailsRecode purchaseReceiptDetailsRecode);

    PurchaseNotReceiptVo getPurchaseNotReceiptCallbackIncomingInspection();

    List<PurchaseNotReceiptListVo> getPurchaseNotReceiptListCallbackIncomingInspection(@Param("sbillno") String sbillno, @Param("tc") Integer tc);

    void updatePurchaseReceiptCallbackIncomingInspection(String pmds055, String pmdsdocno, Integer opflg);

    DeletePurchaseNotReceiptVo getDeletePurchaseReceiptCallbackIncomingInspectionTc(String orderNo);

    List<PurchaseReceiptRackBinding> getPurchaseReceiptFormCallbackByRackBinding();

    SellOutCallbackVo getSellOutCallback();

    List<SellOutListCallbackVo> getSellOutListCallback(@Param("outnoList") List<String> outnoList);

    void updateSellOutCallback(String outno, String xmdk036, int opflg);

    DeleteSellOutCallbackVo getDeleteSellOutCallback(String orderNo);

    int getCompleteInCallbackRunCard(@Param("orderNo") String orderNo);

    DeleteTransferOutOutCallback getDeleteTransferOutOutCallback(@Param("orderNo") String orderNo);

    List<PurchaseReceiptDetailsVo> getPurchaseReceiptDetailsVoByInspectionNos(List<String> inspectionNos);

    void updatePurchaseReceiptFormCallbackRackBinding(@Param("purchaseReceiptDetailsRecode") PurchaseReceiptDetailsRecode purchaseReceiptDetailsRecode);

    void updateWarehouseTransferInCallback(String indcdocno, String message, int opflg);

    void updateWarehouseTransferPost(String indcdocno, String message, int opflg);

    WarehouseTransferPostVo getWarehouseTransferPost();

    WorkOrderIssueVo getWorkOrderIssue(String orderNo);

    void insertWorkOrderIssue(@Param("workOrderIssueVo") WorkOrderIssueVo workOrderIssueVo, @Param("code") String code, @Param("message") String message);

    DeleteTransferInCallback getDeleteTransferInCallback(String orderNo);

    MiscellaneousPostVo getMiscellaneousPost();

    void updateMiscellaneousPost(String inbadocno, String message, int opflg);

    TransferOutPostVo getTransferOutPost();

    void updateTransferOutPost(String indcdocno, String message, int opflg);

    Integer getTransferOutListCount(String indcdocno);

    List<BackRecord> getBackRecordByOutno(String orderNo);

    void updateAsyncWorkorderList(@Param("list") List<BackRecord> backRecordByOutno);

    void deleteBackRecord(String orderNo);

    String getInventoryInag003(@Param("req") PickingOutVoReceiptListReq pickingOutVoReceiptListReq);

    List<PickingOutVo> getPickingOutCallbackTest();

    Integer getCompleteInCallbackRunCardInno(String sfeaud005);

    void updatePurchaseReceiptCallbackIncomingInspection(String substringBefore, String pmdsdocno, int i);

    void updatePurchaseReceiptCallbackIncomingInspectionTc(String substringBefore, String pmdsdocno, int i);

    void updateStInstoreCp(String inno);

    SalesReturnsVo getSalesReturns();

    List<SalesReturnsListVo> getSalesReturnsList(String xmdkdocno);

    void updateSalesReturnsCallback(String xmdkdocno, String sfeadocno, int opflg);

    int checkProcurementDetails(Set<String> purchaseOrderNos);

    void updateStMoveFillbackStatus(@Param("moveno") String moveno, @Param("message") String message, @Param("fillbackStatus") int fillbackStatus);

    List<PurchaseReceiptRackBinding> getPurchaseReceiptFormCallbackByRackBindingWithMoveno(@Param("moveno") String moveno);

    PurchaseNotReceiptVo getPurchaseNotReceiptCallbackIncomingInspectionWithTimeOut();

    void deletePurchaseReceiptDetailsByCheckNo(@Param("inspectionNos") Set<String> inspectionNos);

    void getCheckDetailFromErpByCheckNo(@Param("inspection") String inspection);

    void updateStMoveFillbackStatusToNull(@Param("moveno") String moveno);

    List<String> getInspectionNosByStMoveMaterial(@Param("moveno") String moveno, @Param("mcode") String mcode, @Param("batchno") String batchno, @Param("storage") String storage);

    void updaCheckZjFlg(String pmds055);

    DeletePurchaseNotReceiptVo getDeletePurchaseReceiptCallbackIncomingInspection(String orderNo);

    void updateInstoreByCheckNo(String pmds055, String tc);

    void deleteInstoreByCheckNo(String pmds055, String tc);

    List<AsyncWorkorderVo> getWOrkOrderReq(@Param("param") ReturnInReceiptListVo returnInReceiptListVo);

    ProcurementDetailsVo getProcurementDetails(String pmdt001);

    String getCheckmaterialRollback();

    void updateCheckmaterialRollback(String checkno, int stopflg, String msg);

    CodeHoldcntVo getCodeHoldcnt();

    void updateCpbarcodelistDj(@Param("param") CodeHoldcntVo codeHoldcntVo);

    MiscellaneousPostVo getMiscellaneousPostIn();

    void warehouseTransferCallbackLose();

    void transferInCallbackLose();

    void pickingOutCallbackLose();

    void returnInCallbackLose();

    void completeInCallbackLose();

    void sellOutCallbackLose();

    void warehouseTransferPostLose();

    void MiscellaneousPostLose();

    void TransferOutPostLose();

    void SalesReturnsLose();

    void purchaseGetLose();

    void purchaseInLose();

    void genIqcDataLose();

    PurchaseBackPostVo getPurchaseBackPost();

    void updatePurchaseBackPost(@Param("sourceid") String pmdsdocno, @Param("data") String data, @Param("opflg") int opflg);

    List<MiscellaneousPostListVo> getMiscellaneousPostInList(@Param("inbadocno") String inbadocno);

    void updateMiscellaneousPostIn(String inbadocno, String message, int opflg);

    void updatePurchaseReceiptByCheckno(String orderNo);

//    WarehouseTransferPostVo getWarehouseTransferPost();
}
